package com.xxl.job.admin.core.conf;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;


/**
 * @author pan.shun
 * @since 2023/8/6 13:44
 */
@Slf4j
@Component
public class RunInit implements ApplicationRunner {
    @Override
    public void run(ApplicationArguments args) throws Exception {
        log.info("------------------------------\r\nXXL-JOB 访问地址：http://localhost:{}{} \r\n 默认密码： admin / 123456", port, contextPath);
    }
    @Value("${server.port}")
    private Integer port;

    @Value("${server.servlet.context-path}")
    private String contextPath;
}
